/*
import { RequestTools } from "."
 * @Author: songxiang songxiang0806@qq.com
 * @Date: 2025-08-27 10:11:05
 * @LastEditors: songxiang songxiang0806@qq.com
 * @LastEditTime: 2025-08-28 20:35:11
 * @FilePath: \supermap-webgl\src\api\common.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { AxiosInstance, AxiosRequestConfig } from 'axios'
import { RequestTools } from '.'

export default ({
  service,
  request,
  tools
}: {
  service: AxiosInstance
  request: (config: AxiosRequestConfig<any>) => Promise<any>
  tools: RequestTools
}) => ({
  //获取本地文件
  get(url: string) {
    return service({
      url: url,
      method: 'get'
    })
  },
  // 发送post请求
  post(url: string, data?: any) {
    return service({
      url: url,
      method: 'post',
      data
    })
  }
})
